package com.xgd.phylw.service.impl;

import com.xgd.phylw.bean.Seat;
import com.xgd.phylw.bean.SeatExample;
import com.xgd.phylw.mapper.SeatMapper;
import com.xgd.phylw.service.SeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SeatServiceImpl implements SeatService {
    @Autowired
    private SeatMapper seatMapper;
    public List<Seat> selectByScheduleId(Integer scheduleId) {
        SeatExample seatExample = new SeatExample();
        seatExample.createCriteria().andScheduleIdEqualTo(scheduleId);
        return seatMapper.selectByExample(seatExample);
    }

    public int insertSeatByList(List<Seat> seatList) {
        return seatMapper.insertSeatByList(seatList);
    }

    public Integer selectSeatsByScheduleId(Integer ScheduleId) {
        return seatMapper.selectSeatsByScheduleId(ScheduleId);
    }
}
